package com.boot.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

//加载之后放到Spring容器中
@Configuration
public class AppConfig {
    @Value("${driverClassName}")
    String driverClassName;

    @Value("${mysql.driver}")
    String driver;

    @Value("${mysql.url}")
    String url;

    @Value("${myUser.uname}")
    String uname;

    @Override
    public String toString() {
        return "AppConfig{" +
                "driverClassName='" + driverClassName + '\'' +
                ", driver='" + driver + '\'' +
                ", url='" + url + '\'' +
                ", uname='" + uname + '\'' +
                '}';
    }
}
